-
Notifications
You must be signed in to change notification settings - Fork 2
16/feat/get/areas/area id/components #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot please review last commit |
|
@mfaferek93 I've opened a new pull request, #21, to work on those changes. Once the pull request is ready, I'll request review from you. |
1096dcd to
c8eaa64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements two new REST API endpoints for component discovery and filtering: /components (lists all components across all areas) and /areas/{area_id}/components (lists components within a specific area). These endpoints enhance the gateway's discovery capabilities by exposing component-level information in addition to the existing area-level data.
Key Changes:
- Added two new REST endpoint handlers (
handle_list_componentsandhandle_area_components) following existing patterns - Implemented comprehensive integration tests with proper error case coverage (404 for non-existent areas)
- Updated documentation with detailed API reference including examples, response structures, and use cases
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/ros2_medkit_gateway/src/rest_server.cpp |
Implements two new endpoint handlers with consistent error handling and JSON serialization |
src/ros2_medkit_gateway/include/ros2_medkit_gateway/rest_server.hpp |
Adds function declarations for the two new endpoint handlers |
src/ros2_medkit_gateway/test/test_integration.test.py |
Adds three comprehensive tests covering component listing, area-filtered components, and 404 error handling; renumbers existing test from test_21_ to test_04_ for sequential ordering |
src/ros2_medkit_gateway/README.md |
Adds extensive API documentation with curl examples, response formats, field descriptions, and use cases for both new endpoints |
postman/collections/ros2-medkit-gateway.postman_collection.json |
Adds two new Postman requests for testing the component endpoints |
postman/README.md |
Updates quick start guide with examples for testing the new endpoints |
docs/README.md |
Updates architecture documentation to reflect the new endpoints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add endpoint to list components within a specific area with error handling.
Changes:
- Add REST handler for GET /areas/{area_id}/components with path parameter
- Implement area validation and 404 error response for nonexistent areas
- Filter components by area from entity cache
- Add test_05_area_components_success integration test
- Add test_06_area_components_nonexistent_error integration test
- Update README with API reference, success/error examples, and use cases
- Update Postman collection with new endpoint and testing instructions
c8eaa64 to
a286a32
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mfaferek93 I've opened a new pull request, #22, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bburda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Pull Request
Description
What changed and why.
Type of change
Related issues
Fixes # (if applicable)
Related to # (if applicable)
How has this been tested?
Describe the tests you ran to verify your changes.
Checklist
colcon buildand the build succeeds without warningscolcon testand all tests pass locallyAdditional notes for reviewers